Software defined networking orchestration method and sdn controller

ABSTRACT

A SDN orchestration method includes: obtaining a first request for creating a first logical switch; creating a control plane instance of the first logical switch, and sending first configuration information to instruct the first forwarding device to configure the data plane instance of the first logical switch; obtaining a second request for connecting the first logical switch to a first logical router; sending second configuration information to instruct the first forwarding device to configure a first port of the data plane instance of the first logical switch to be communicatively connected to a second port of a data plane instance of the first logical router on the second forwarding device configured with the data plane instance of the first logical router; and sending third configuration information to instruct the second forwarding device to configure the second port to be communicatively connected to the first port.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/698,648, filed on Nov. 27, 2019, which is a continuation ofInternational Application No. PCT/CN2018/074471, filed on Jan. 29, 2018,which claims priority to Chinese Patent Application No. 201710400330.3,filed on May 31, 2017. All of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to the field of communications technologies,and in particular, to a software defined networking orchestration methodand an SDN controller.

BACKGROUND

Software defined networking (Software Defined Network, SDN) is aninnovative network architecture that is capable of getting rid oflimitations of hardware on the network architecture, and modifying anetwork like upgrading or installing software. In essence, SDN issoftware-based networking. In comparison with a prior networkarchitecture, SDN can implement various functions in a network in abetter and simpler way.

OpenStack is an open-source infrastructure as a service (Infrastructureas a Service, IaaS) cloud computing platform that allows anyone toestablish and provide their own cloud computing services. The Neutronmodel provided by the OpenStack community is a most widely used SDNnetwork service model at present. This model uses a virtualizationtechnology to virtualize a conventional network into logical networks,and pushes management functions on the logical networks to a user side,implementing flexible networking, operation and maintenance, andapplication. When orchestrating an SDN network by using the Neutronmodel, a user needs to create logical routers, logical networks, logicalsubnets, logical ports, and the like, and then perform operations suchas associating the logical subnets with the logical routers.

The Neutron model focuses on service capabilities of an SDN network.This requires that a user have a deep understanding of servicecapabilities of the network in order to orchestrate the SDN network byusing the Neutron model.

SUMMARY

This application provides a software defined networking orchestrationmethod and an SDN controller, to provide a new method for orchestratingan SDN network, so as to help a user orchestrate an SDN network.

According to a first aspect, this application provides a softwaredefined networking orchestration method, including: obtaining, by an SDNcontroller, a first request for creating a first logical switch, wherethe first request may be sent by a platform, or a user may directlyenter a command into the SDN controller to generate the first request;in response to the first request, creating, by the SDN controller, acontrol plane instance of the first logical switch, determining todeploy a data plane instance of the first logical switch on a firstforwarding device, and sending first configuration information to thefirst forwarding device, where the first configuration information isused to instruct the first forwarding device to configure the data planeinstance of the first logical switch, the control plane instance of thefirst logical switch is used to run a communications protocol, generatea forwarding rule table, and send the forwarding rule table to the dataplane instance of the first logical switch, and the data plane instanceof the first logical switch is used to perform data forwarding accordingto the forwarding rule table; and configuring, by the first forwardingdevice according to the first configuration information, the data planeinstance of the first logical switch. Then, the SDN controller obtains asecond request for connecting the first logical switch to a firstlogical router; and in response to the second request, the SDNcontroller sends second configuration information to the firstforwarding device, and sends third configuration information to a secondforwarding device configured with a data plane instance of the firstlogical router, where the second configuration information is used toinstruct the first forwarding device to configure a first port of thedata plane instance of the first logical switch to be communicativelyconnected to a second port of the data plane instance of the firstlogical router on the second forwarding device, and the thirdconfiguration information is used to instruct the second forwardingdevice to configure the second port to be communicatively connected tothe first port. That the first port is communicatively connected to thesecond port indicates that a communicative connection is establishedbetween the first port and the second port. Data can be transmittedbetween the data plane instance of the first logical router and the dataplane instance of the first logical switch through the communicativeconnection between the first port and the second port. In someembodiments, when the SDN controller receives the second request, thefirst forwarding device has not created the first port. In this case,the SDN controller first sends, to the first forwarding device,configuration information instructing the first forwarding device tocreate the first port, and sends the second configuration information tothe first forwarding device after the first port is createdsuccessfully. In some embodiments, when the SDN controller receives thesecond request, the second forwarding device has not created the secondport. In this case, the SDN controller first sends, to the secondforwarding device, configuration information instructing the secondforwarding device to create the second port, and sends the thirdconfiguration information to the second forwarding device after thesecond port is created successfully.

With this method, logical switches can be created and connected tological routers, to form an SDN network. Because functions of a logicalrouter and a logical switch may be corresponding to those of a physicalrouter and a physical switch, this makes it easy for a user tounderstand an SDN network architecture, and helps the user orchestratean SDN network. In addition, when an SDN network is orchestrated basedon logical routers and logical switches, an existing network managementsystem and existing tools can be conveniently transplanted into the SDNnetwork, facilitating the ease of detection, configuration, testing, andthe like of SDN network elements.

With reference to the first aspect, in a first possible implementationof the first aspect, the SDN network orchestration method furtherincludes: obtaining, by the SDN controller, a third request forconnecting a first logical host to the first logical switch; in responseto the third request, sending fourth configuration information to acomputing device configured with an instance of the first logical host,where the fourth configuration information is used to instruct thecomputing device to configure a third port of the instance of the firstlogical host to be communicatively connected to a fourth port of thedata plane instance of the first logical switch on the first forwardingdevice; and sending fifth configuration information to the firstforwarding device, where the fifth configuration information is used toinstruct the first forwarding device to configure the fourth port to becommunicatively connected to the third port. In some embodiments, whenthe SDN controller receives the third request, the computing device hasnot created the third port. In this case, the SDN controller firstsends, to the computing device, configuration information instructingthe computing device to create the third port, and sends the fourthconfiguration information to the computing device after the third portis created successfully. In some embodiments, when the SDN controllerreceives the third request, the first forwarding device has not createdthe fourth port. In this case, the SDN controller first sends, to thefirst forwarding device, configuration information instructing the firstforwarding device to create the fourth port, and sends the fifthconfiguration information to the first forwarding device after thefourth port is created successfully. The logical host can be quicklyconnected to the SDN network by using this technical solution.

With reference to the first possible implementation of the first aspect,in a second possible implementation of the first aspect, a manner ofobtaining the third request by the SDN controller is: The SDN controllerreceives a fourth request for connecting the first logical host to anSDN network, determines, based on a topology structure of a physicalnetwork, to connect the instance of the first logical host to the dataplane instance of the first logical switch on the first forwardingdevice, and generates the third request for connecting the first logicalhost to the first logical switch, so as to obtain the third request. Inthis implementation, a platform or a user may not specify which logicalswitch the logical host is connected to, and the SDN controllerdetermines the logical switch to which the logical host is connected.The determining may have a plurality of implementations. For example,the SDN controller determines to connect the logical host to a dataplane instance of a logical switch on a forwarding device that isrelatively close to a computing device on which the instance of thelogical host is located, or connect the logical host to a data planeinstance of a logical switch on a forwarding device with a relativelylight load. In this technical solution, the user may not specify alogical switch to which the logical host is connected, to simplifyoperations of the user to orchestrate the SDN network. In addition, thelogical switch to which the logical host is connected and that isdetermined by the SDN controller based on the topology structure of thephysical network can provide better data transmission services for thelogical host.

With reference to any possible implementation of the first aspect to thesecond possible implementation of the first aspect, in a third possibleimplementation of the first aspect, the first request carriesinformation about a designated forwarding device. The SDN controllerobtains the information about the designated forwarding device from thefirst request, and determines to deploy the data plane instance of thefirst logical switch on the designated forwarding device. There may beone or more designated forwarding devices. When there are a plurality ofdesignated forwarding devices, the first forwarding device is any one ofthe plurality of designated forwarding devices.

With reference to any possible implementation of the first aspect to thesecond possible implementation of the first aspect, in a fourth possibleimplementation of the first aspect, the first request does not carryinformation about a designated forwarding device, and the SDN controllerassigns a forwarding device for deployment of the data plane instance ofthe first logical switch. For example, when the first request is sent bythe platform to the SDN controller, the SDN controller may select aforwarding device that is relatively close to the platform as the firstforwarding device for deployment of the data plane instance of the firstlogical switch, so that the first logical switch can respond to a datatransmission requirement of the platform more rapidly. A distancebetween the forwarding device and the platform is a physical distance ora logical distance between the forwarding device and a serverimplementing functions of the platform. A logical distance between twodevices may be measured by a quantity of intermediate network elementsin a path between the two devices. When two devices are connecteddirectly, the quantity of intermediate network elements is 0, and thelogical distance is the shortest, followed by the logical distance whenthe two devices are connected via one intermediate network element, andso on. For another example, the first request may carry informationabout a logical service that the first logical switch needs to beassociated with. The SDN controller determines a forwarding devicecapable of providing the logical service or a forwarding device that isrelatively close to a service server providing the logical service, asthe first forwarding device for deployment of the data plane instance ofthe first logical switch, so as to better satisfy service requirementsof the user on the first logical switch. For still another example, theSDN controller determines a forwarding device with a relatively lightload currently as a forwarding device for deployment of the data planeinstance of the first logical switch. In this technical solution, theuser may not specify a forwarding device for deployment of the dataplane instance of the logical switch, to simplify operations of the userto orchestrate the SDN network. In addition, the forwarding device thatis determined by the SDN controller based on the topology structure ofthe physical network, for deployment of the data plane instance of thefirst logical switch can better implement a data transmission functionof the first logical switch.

With reference to any possible implementation of the first aspect to thefourth possible implementation of the first aspect, in a fifth possibleimplementation of the first aspect, the SDN controller may furtherdetermine to deploy the data plane instance of the first logical switchon a third forwarding device, and send sixth configuration informationto the third forwarding device, where the sixth configurationinformation is used to instruct the third forwarding device to configurethe data plane instance of the first logical switch. Thereby, aplurality of data plane instances are configured for one logical switch,improving capability and reliability of data forwarding of the logicalswitch.

With reference to the fifth possible implementation of the first aspect,in a sixth possible implementation of the first aspect, the firstconfiguration information is further used to instruct the firstforwarding device to configure a fifth port of the first logical switchthat is configured by the first forwarding device to be communicativelyconnected to a sixth port of the data plane instance of the firstlogical switch on the third forwarding device, and the sixthconfiguration information is further used to instruct the thirdforwarding device to configure the sixth port to be communicativelyconnected to the fifth port. In this implementation, different dataplane instances of one logical switch can be connected, therebyimproving flexibility and reliability of data forwarding.

With reference to any possible implementation of the first aspect to thesixth possible implementation of the first aspect, in a seventh possibleimplementation of the first aspect, if the first logical switch has aplurality of data plane instances, when the first logical switch isconnected to the first logical router, one or more or all data planeinstances of the first logical switch may be connected to the data planeinstance of the first logical router. To be specific, a port of the oneor more or all data plane instances of the first logical switch iscommunicatively connected to a port of the data plane instance of thefirst logical router. In turn, if the first logical router has aplurality of data plane instances, when the first logical switch isconnected to the first logical router, a port of one or more or all dataplane instances of the first logical router may be communicativelyconnected to a port of the data plane instance of the first logicalswitch.

With reference to any possible implementation of the first aspect to theseventh possible implementation of the first aspect, in an eighthpossible implementation of the first aspect, one forwarding device mayconfigure data plane instances of different logical switches, and/or oneforwarding device may configure data plane instances of differentlogical routers, and/or one forwarding device may configure both a dataplane instance of a logical router and a data plane instance of alogical switch.

With reference to the eighth possible implementation of the firstaspect, in a ninth possible implementation of the first aspect, if thefirst forwarding device is deployed with both the data plane instance ofthe first logical switch and the data plane instance of the firstlogical router, when the first logical switch is connected to the firstlogical router, the SDN controller may communicatively connect the portof the data plane instance of the first logical switch on the firstforwarding device to the port of the data plane instance of the firstlogical router on the first forwarding device. Because both the dataplane instance of the first logical switch and the data plane instanceof the first logical router are located on the first forwarding device,time consumed for data transmission between the first logical switch andthe first logical router can be reduced, and data transmissionefficiency of the SDN network can be improved.

With reference to any possible implementation of the first aspect to theninth possible implementation of the first aspect, in a tenth possibleimplementation of the first aspect, the SDN network orchestration methodfurther includes: obtaining, by the SDN controller, a sixth request forassociating the first logical switch with a first logical service; inresponse to the six request, determining an access port of an instanceof the first logical service; and sending eighth configurationinformation to the first forwarding device, where the eighthconfiguration information is used to instruct the first forwardingdevice to configure a seventh port of the data plane instance of thefirst logical switch to be communicatively connected to the access port.In this technical solution, the SDN controller communicatively connectsa port of a logical forwarding device to a port of a logical service,thereby associating the logical forwarding device with the logicalservice.

With reference to any possible implementation of the first aspect to thetenth possible implementation of the first aspect, in an eleventhpossible implementation of the first aspect, the platform sends, to theSDN controller, a request for creating a logical network, the SDNcontroller saves information about the logical network, for example, anidentifier of a logical router to which the logical network isconnected, and an identifier of the logical network, and then returns,to the platform, a message about successful creation of the logicalnetwork. Then, the platform sends, to the SDN controller, a request forcreating a logical subnet of the logical network, and the SDN controllerdetermines, based on the request for creating a logical subnet and thesaved information about the logical network, to create the first logicalswitch, and obtains the first request for creating the first logicalswitch. In this technical solution, the SDN controller can support aplatform in orchestrating an SDN network based on a service model of theplatform itself, thereby improving compatibility of the SDN controllerwith existing platforms.

With reference to the eleventh possible implementation of the firstaspect, in a twelfth possible implementation of the first aspect, if therequest for creating a logical network carries a message indicating thatthe logical network is connected to the first logical router, the SDNcontroller may perform the step of connecting the first logical switchto the first logical router, after the first logical switch issuccessfully created, so as to improve efficiency of SDN networkorchestration.

According to a second aspect, this application provides an SDNcontroller. The SDN controller is configured to execute the method inthe first aspect or any possible implementation of the first aspect.Specifically, the SDN controller includes a module configured to executethe method in the first aspect or any possible implementation of thefirst aspect.

According to a third aspect, this application provides an SDNcontroller, including a processor, a memory, and a communicationsinterface, where the memory stores a computer instruction, thecommunications interface is configured to communicate with devices otherthan the SDN controller, and the processor is connected to the memoryand the communications interface, and is configured to call the computerinstruction stored in the memory to execute the method in the firstaspect or any possible implementation of the first aspect.

According to a fourth aspect, this application provides an SDNcommunications system, and the system includes an SDN controller and aplatform. The platform is configured to send an SDN networkorchestration request to the SDN controller, and the SDN controller isconfigured to execute the method in the first aspect or any possibleimplementation of the first aspect in response to the SDN networkorchestration request sent by the platform. Further, the system mayfurther include a forwarding device, and the forwarding device isconfigured to work according to configuration information sent by theSDN controller.

According to a fifth aspect, this application further provides acomputer readable storage medium, where the readable storage mediumstores a computer instruction, and when the instruction is run on acomputer, the computer executes the method in the first aspect or anypossible implementation of the first aspect.

Based on the implementations provided in the foregoing aspects, furthercombinations may be obtained to provide more implementations.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of a management network system accordingto an embodiment of this application;

FIG. 2 is a flowchart of creating a first logical switch according to anembodiment of this application;

FIG. 3 is a schematic diagram of different types of forwarding devicesaccording to an embodiment of this application;

FIG. 4 is a schematic diagram of connecting a first logical switch to afirst logical router according to an embodiment of this application;

FIG. 5 is a schematic diagram of connecting a logical host to a firstlogical switch according to an embodiment of this application;

FIG. 6 is a schematic diagram of ports of data plane instances of alogical switch and a logical router in an SDN network;

FIG. 7 is a schematic diagram of an SDN network orchestration interfaceaccording to an embodiment of this application;

FIG. 8 is a schematic diagram of an SDN controller according to anembodiment of this application; and

FIG. 9 is another schematic diagram of an SDN controller according to anembodiment of this application.

DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of thisapplication clearer, the following further describes this application indetail with reference to the accompanying drawings.

This application provides a software defined networking orchestrationmethod and an SDN controller, to provide a new method for orchestratingan SDN network, so as to help a user orchestrate an SDN network. Themethod and the apparatus are based on a same invention idea. Because themethod and the SDN controller employ similar problem-solving principles,mutual reference may be made to implementation of the apparatus and themethod, and repetition is avoided.

It should be understood that “a plurality of” used in this applicationmeans two or more than two. In addition, in descriptions of thisapplication, the terms such as “first” and “second” are used only for adistinguishing purpose, and shall not be understood as an indication orimplication of relative importance, or understood as an indication orimplication of an order.

A so-called network service model includes an interaction mode betweenlogical networks, a network policy, service classes, a servicescheduling policy, and the like. The network service model is orientedtoward user requirements, and is irrelevant to an implementationtechnology or a physical network. For example, the network service modeldefines how a user orchestrates an SDN network. FIG. 1 is a schematicdiagram of a management network system according to an embodiment ofthis application. The system includes: an SDN controller 10, forwardingdevices 20, and platforms 30. The forwarding device 20 may be a physicalswitch, a physical router, or the like. The platform 30 may be a cloudplatform, a network management platform, a computing platform, or thelike. The SDN controller 10 is located between the forwarding devices 20and the platforms 30, and is responsible for mapping from logicalnetworks to a physical network, so that the physical network thatincludes the forwarding devices 20 provides services for the platforms30. The SDN controller 10 may be implemented by one or more chips. Thesechips may be located in one physical device, or may be located indifferent physical devices. Alternatively, the SDN controller 10 may beimplemented by a processor by running computer program instructions.Different modules of the SDN controller 10 may be implemented by aprocessor of one physical device by running a computer program, or maybe implemented by processors of different physical devices by running acomputer program. The platform 30 may be implemented by one server or acluster of a plurality of servers. Specifically, the platform 30 may beimplemented by a hardware chip in a server, or may be implemented by aprocessor of a server by running a computer program.

Optionally, the SDN controller 10 includes a core 11 of the SDNcontroller 10, a user interface (User Interface, UI) module 12, platformapplications 13, and device drivers 14. The SDN controller core 11includes a controller service layer 111 and a service model module 112,where the controller service layer 111 is configured to orchestrate anSDN network based on user requirements. Optionally, the controllerservice layer 111 may further provide a plurality of functions such astopology management, host management, and device management. The servicemodel module 112 is configured to provide network service models, andgenerate an application programming interface (Application ProgrammingInterface, API) for each network service model, for call by modules suchas the UI module 12 and the platform applications 13. The UI module 12is configured to provide a user with an interface for networkorchestration so that the user can orchestrate a network based onoperable objects provided by the UI module 12. A UI provided by the UImodule 12 may be a graphical interface. The platform application 13 isconfigured to convert a configuration model of the platform 30 into auniform service model, and send the service model resulting from theconversion to the service model module 112, and the service model module112 can provide this resulting service model to the outside. The devicedriver 14 is configured to convert configuration information deliveredby the controller service layer 111 to a physical forwarding device intoa form supported by the physical forwarding device.

In the embodiments of this application, logical routers and logicalswitches may be collectively referred to as logical forwarding devices.A logical forwarding device includes a control plane instance and a dataplane instance. The control plane instance of the logical forwardingdevice is deployed on the SDN controller 10, and is used to run acommunications protocol, generate a forwarding rule table, and send theforwarding rule table to the data plane instance of the logicalforwarding device. The data plane instance of the logical forwardingdevice is deployed on a physical forwarding device, and is used toperform data forwarding according to the forwarding rule table deliveredby the control plane instance of the logical forwarding device. Aforwarding rule table generated by a control plane instance of a logicalswitch is a forwarding table, whereas a forwarding rule table generatedby a control plane instance of a logical router is a routing table. Forease of description, a “physical forwarding device” is briefly referredto as a “forwarding device” in the embodiments of this application.

The following uses creation of a logical switch as an example tointroduce a creating process of a logical forwarding device. Withreference to FIG. 2, a logical switch creating process includes thefollowing steps.

Step 401: An SDN controller 10 obtains a first request for creating afirst logical switch. The first request may be sent by a platform 30.Alternatively, a user may directly enter a command into the SDNcontroller 10, for example, perform a command line operation on andenter a command into the SDN controller 10, to generate the firstrequest.

Step 402: The SDN controller 10 creates a control plane instance of thefirst logical switch.

Step 403: The SDN controller 10 determines to deploy a data planeinstance of the first logical switch on a first forwarding device, andsends first configuration information to the first forwarding device,where the first configuration information is used to instruct the firstforwarding device to configure the data plane instance of the firstlogical switch; the control plane instance of the first logical switchis used to run a communications protocol, generate a forwarding ruletable, and send the forwarding rule table to the data plane instance ofthe first logical switch; and the data plane instance of the firstlogical switch is used to perform data forwarding according to theforwarding rule table.

In this embodiment of this application, that the SDN controller 10determines a forwarding device for deployment of the data plane instanceof the first logical switch may include a plurality of implementations,including:

Manner 1: The first request carries information about a designatedforwarding device. The SDN controller 10 obtains the information aboutthe designated forwarding device from the first request, and determinesto deploy the data plane instance of the first logical switch on thedesignated forwarding device. There may be one or more designatedforwarding devices. When there are a plurality of designated forwardingdevices, the first forwarding device is any one of the plurality ofdesignated forwarding devices.

Manner 2: The first request does not carry information about adesignated forwarding device, and the SDN controller 10 assigns aforwarding device for deployment of the data plane instance of the firstlogical switch.

For example, when the first request is sent by the platform 30 to theSDN controller 10, the SDN controller 10 may select a forwarding devicethat is relatively close to the platform 30 as the first forwardingdevice for deployment of the data plane instance of the first logicalswitch, so that the first logical switch can respond to a datatransmission requirement of the platform 30 more rapidly. A distancebetween the forwarding device and the platform 30 is a physical distanceor a logical distance between the forwarding device and a serverimplementing functions of the platform 30. A logical distance betweentwo devices may be measured by a quantity of intermediate networkelements in a path between the two devices. When two devices areconnected directly, the quantity of intermediate network elements is 0,and the logical distance is the shortest, followed by the logicaldistance when the two devices are connected via one intermediate networkelement, and so on.

For another example, the first request may carry information about alogical service that the first logical switch needs to be associatedwith. The SDN controller 10 determines a forwarding device capable ofproviding the logical service or a forwarding device that is relativelyclose to a service server providing the logical service, as the firstforwarding device for deployment of the data plane instance of the firstlogical switch, so as to better satisfy service requirements of the useron the first logical switch.

For still another example, with reference to FIG. 3, some forwardingdevices in a physical network may be configured for deployment of onlydata plane instances of logical switches, for example, a forwardingdevice 2 and a forwarding device 4 in FIG. 3; other forwarding devicesmay be configured for deployment of only data plane instances of logicalrouters, for example, a forwarding device 1 in FIG. 3; and still otherdevices may be configured for deployment of both data plane instances oflogical switches and data plane instances of logical routers, forexample, a forwarding device 3 in FIG. 3. After receiving the firstrequest, the SDN controller 10 selects a forwarding device that supportsdeployment of the data plane instance of the logical switch as the firstforwarding device. Optionally, a forwarding device may be configured fordeployment of neither a data plane instance of a logical switch, nor adata plane instance of a logical router. These different types offorwarding devices may be configured by a user, or may be configured bythe SDN controller 10 based on attributes, service processingcapabilities or locations of the forwarding devices. For example, when aplurality of forwarding devices form a tree topology structure, aforwarding device located at the top of the tree topology structure maybe configured for deployment of only data plane instances of logicalrouters, a forwarding device located at the middle of the tree topologystructure may be configured for deployment of both data plane instancesof logical switches and data plane instances of logical routers, and aforwarding device located at the bottom of the tree topology structuremay be configured for deployment of only data plane instances of logicalswitches. Such configurations for the forwarding devices can improveflexibility of deploying data plane instances of logical forwardingdevices.

It should be noted that the plurality of possible implementationsintroduced in Manner 2 may be combined to form more implementations.

With steps 401 to 403, a logical switch can be created in an SDNnetwork. One logical switch may include one control plane instance andone or more data plane instances. When a logical switch includes aplurality of data plane instances, each data plane instance of thelogical switch is deployed according to step 403. A creating process ofa logical router is consistent with the creating process of a logicalswitch, and therefore no more details are described herein.

With reference to FIG. 4, the following introduces a process ofconnecting a logical switch to a logical router, including the followingsteps.

Step 404: The SDN controller 10 obtains a second request for connectingthe first logical switch to a first logical router.

Step 405: The SDN controller 10 sends second configuration informationto the first forwarding device, where the second configurationinformation is used to instruct the first forwarding device to configurea first port of the data plane instance of the first logical switch tobe communicatively connected to a second port of a data plane instanceof the first logical router on a second forwarding device configuredwith the data plane instance of the first logical router. In thisembodiment of this application, that two ports are communicativelyconnected means that a communicative connection is established betweenthe two ports. For example, when the first port is communicativelyconnected to the second port, it indicates that a communicationsconnection is established between the first port and the second port.Data transmission can be performed between the data plane instance ofthe first logical router and the data plane instance of the firstlogical switch through the communications connection between the firstport and the second port. In some embodiments, the first forwardingdevice has not created the first port. In this case, the SDN controller10 first sends, to the first forwarding device, configurationinformation instructing the first forwarding device to create the firstport, and sends the second configuration information to the firstforwarding device after the first port is created successfully.

Step 406: The SDN controller 10 sends third configuration information tothe second forwarding device, where the second configuration informationis used to instruct the first forwarding device to configure the firstport of the data plane instance of the first logical switch to becommunicatively connected to the second port of the data plane instanceof the first logical router on the second forwarding device, and thethird configuration information is used to instruct the secondforwarding device to configure the second port to be communicativelyconnected to the first port. In some embodiments, the second forwardingdevice has not created the second port. In this case, the SDN controller10 first sends, to the second forwarding device, configurationinformation instructing the second forwarding device to create thesecond port, and sends the third configuration information to the secondforwarding device after the second port is created successfully.

By repeating step 401 to step 406, logical switches and logical routerscan be created, and the logical switches can be connected to the logicalrouters to form an SDN network. Because functions of a logical routerand a logical switch may be corresponding to those of a physical routerand a physical switch, this makes it easy for a user to understand anSDN network architecture, and helps the user orchestrate an SDN network.In addition, when an SDN network is orchestrated based on logicalrouters and logical switches, an existing network management system andexisting tools can be conveniently transplanted into the SDN network,facilitating the ease of detection, configuration, testing, and the likeof SDN network elements.

With reference to FIG. 5, the following introduces a process ofconnecting a logical host to an SDN network, including the followingsteps.

Step 407: The SDN controller 10 obtains a third request for connecting afirst logical host to the first logical switch. The logical host may bea virtual machine, a physical device or some functional entities of aphysical device, a virtual machine cluster including a plurality ofvirtual machines, a device cluster including a plurality of physicaldevices, or some functional entities of a device cluster including aplurality of physical devices. For example, the logical host may be aDynamic Host Configuration Protocol server (Dynamic Host ConfigurationProtocol Server, DHCP Server) or a value added service (value addedservice, VAS) entity.

One implementation for the SDN controller 10 to obtain the third requestis that the SDN controller 10 receives the third request from a platform30, or that a user enters a command to the SDN controller 10 to inputthe third request. Another implementation for the SDN controller 10 toobtain the third request is: The SDN controller 10 receives a fourthrequest for connecting the first logical host to an SDN network,determines, based on a topology structure of a physical network, toconnect an instance of the first logical host to the data plane instanceof the first logical switch on the first forwarding device, andgenerates the third request for connecting the first logical host to thefirst logical switch, so as to obtain the third request. In other words,the platform 30 or the user does not specify which logical switch thelogical host is connected to, and the SDN controller 10 determines thelogical switch to which the logical host is connected. For a determiningmanner, reference may be made to the plurality of implementationsintroduced in Manner 2 in step 403. For example, the SDN controller 10determines to connect the logical host to a data plane instance of alogical switch on a forwarding device that is relatively close to acomputing device on which an instance of the logical host is located, orconnect the logical host to a data plane instance of a logical switch ona forwarding device with a relatively light load.

Step 408: The SDN controller 10 sends fourth configuration informationto a computing device configured with an instance of the first logicalhost, where the fourth configuration information is used to instruct thecomputing device to configure a third port of the instance of the firstlogical host to be communicatively connected to a fourth port of thedata plane instance of the first logical switch on the first forwardingdevice. If the computing device has not created the third port, the SDNcontroller 10 first sends, to the computing device, configurationinformation instructing the computing device to create the third port,and sends the fourth configuration information to the computing deviceafter the third port is created successfully.

Step 409: The SDN controller 10 sends fifth configuration information tothe first forwarding device, where the fifth configuration informationis used to instruct the first forwarding device to configure the fourthport to be communicatively connected to the third port. If the firstforwarding device has not created the fourth port, the SDN controller 10first sends, to the first forwarding device, configuration informationinstructing the first forwarding device to create the fourth port andsends the fifth configuration information to the first forwarding deviceafter the fourth port is created successfully.

The logical host can be quickly connected to the SDN network by usingthe technical solution in step 406 to step 409.

Optionally, when the first logical switch includes a plurality of dataplane instances, any two data plane instances of the first logicalswitch may be connected. That is, ports of the two data plane instancesare communicatively connected. All data plane instances of the firstlogical switch may be connected to form a star topology structure, whereone data plane instance acts as a center, and the rest data planeinstances are all connected to the center data plane instance. All dataplane instances of the first logical switch may be connected to form amesh topology structure, where all data plane instances of the firstlogical switch are connected in pairs. Alternatively, all data planeinstances of the first logical switch may be connected to form a treetopology structure, a serial topology structure, or the like. Likewise,two data plane instances of a logical router may be connected in thesame way. When different data plane instances of a logical switch or alogical router are connected, flexibility and reliability of dataforwarding can be improved.

Optionally, if the first logical switch has a plurality of data planeinstances, when the first logical switch is connected to the firstlogical router, one or more or all data plane instances of the firstlogical switch may be connected to the data plane instance of the firstlogical router. To be specific, a port of the one or more or all dataplane instances of the first logical switch is communicatively connectedto a port of the data plane instance of the first logical router. Inturn, if the first logical router has a plurality of data planeinstances, when the first logical switch is connected to the firstlogical router, a port of one or more or all data plane instances of thefirst logical router may be communicatively connected to a port of thedata plane instance of the first logical switch. If both the firstlogical switch and the first logical router include a plurality of dataplane instances, one data plane instance of the first logical switch maybe connected to one data plane instance of the first logic router. Whenthe first logical switch has a plurality of data plane instancesconnected to data plane instances of the first router, different dataplane instances of the first logical switch are connected to differentdata planes of the first logic router. The plurality of connection waysbetween the first logical switch and the first logical router may bespecified by the platform 30 or the user based on a requirement of theplatform 30 or the user, or may be determined by the SDN controller 10based on the topology structure of the physical network or based on boththe topology structure and a user requirement, so as to orchestrate ahigh-efficiency SDN network that satisfies the user requirement.

Optionally, if the first forwarding device is deployed with both thedata plane instance of the first logical switch and the data planeinstance of the first logical router, when the first logical switch isconnected to the first logical router, the SDN controller 10 maycommunicatively connect the port of the data plane instance of the firstlogical switch on the first forwarding device to the port of the dataplane instance of the first logical router on the first forwardingdevice. Because both the data plane instance of the first logical switchand the data plane instance of the first logical router are located onthe first forwarding device, time consumed for data transmission betweenthe first logical switch and the first logical router can be reduced,and data transmission efficiency of the SDN network can be improved.

The following introduces various ports of data plane instances of alogical switch and a logical router with reference to FIG. 6. In thefigure, a type-A node 501 is a forwarding device configured to supportdeployment of data plane instances of logical switches, and a type-Bnode 502 is a forwarding device configured to support deployment of dataplane instances of logical routers. An L2 instance 503 is a data planeinstance of a logical switch, and an L3 instance 504 is a data planeinstance of a logical router. A type-a port 505 is a port used forconnecting different data plane instances of one logical switch, wherethe foregoing fifth port and sixth port are type-a ports 505. A type-bport 506 is a port, of a data plane instance of a logical switch, usedfor connecting to a data plane instance of a logical router, where theforegoing first port is a type-b port 506. A type-c port 507 is a port,of a data plane instance of a logical switch, used for connecting to aninstance of a logical host, where the foregoing fourth port is a type-bport 507. A type-d port 508 is a port used for connecting different dataplane instances of one logical router. A type-e port 509 is a port, of adata plane instance of a logical router, used for connecting to a dataplane instance of a logical switch, where the foregoing second port is atype-e port 509. A type-f port 510 is a port, of a data plane instanceof a logical router, used for connecting to a data plane instance ofanother logical router. An L2 link instance 511 is a link betweendifferent data plane instances of one logical switch. An L2 externallink instance 512 is a link between data plane instances of a logicalswitch and a logical host. An L3 link instance 513 is a link betweendifferent data plane instances 504 of one logical router. An L3 externallink instance 514 is a link between a data plane instance of one logicalrouter and a data plane instance of another logical router, and is usedfor implementing communicative connection between a plurality of logicalrouters at a network layer. An L2L3 link instance 515 is a link betweena data plane instance of a logical switch and a data plane instance of alogical router, and is used for implementing communicative connectionbetween a link layer and the network layer.

Optionally, logical switches and logical routers may be furtherassociated with logical services, for example, services such asmirroring, traffic diversion, quality of service (Quality of Service,QoS), security group, and DHCP relay. A process of associating a logicalswitch with a first logical service is as follows: The SDN controller 10obtains a sixth request for associating the first logical switch withthe first logical service; in response to the sixth request, determinesan access port of an instance of the first logical service; and sendseighth configuration information to the first forwarding device, wherethe eighth configuration information is used to instruct the firstforwarding device to configure a seventh port of the data plane instanceof the first logical switch to be communicatively connected to theaccess port.

This request for associating with the first logical service may be sentby the platform 30, or may be generated by a direct entry operation ofthe user on the SDN controller 10. After receiving the sixth request,the SDN controller 10 searches for a service server providing the firstlogical service. A searching result falls in the following severalcases:

Case 1: The SDN controller 10 finds that the service server providingthe first logical service is the forwarding device deployed with thedata plane instance of the first logical switch. The SDN controller 10instructs the forwarding device to communicatively connect a port of thedata plane instance of the first logical switch to a port of the firstlogical service.

Case 2: The SDN controller 10 finds that only one service serverprovides the first logical service, and that the service server is notthe forwarding device deployed with the data plane instance of the firstlogical switch. The SDN controller 10 instructs the forwarding devicedeployed with the data plane instance of the first logical switch tocommunicatively connect to a port of the data plane instance of thefirst logical switch to a port of the first logical service on theservice server. In some optional implementations, the SDN controller 10further needs to instruct the service server to communicatively connectthe port of the first logical service to the port of the data planeinstance of the first logical switch on the first forwarding device.

Case 3: The SDN controller 10 finds that a plurality of service serverscan provide the first logical service, and that the plurality of serviceservers do not include the forwarding device deployed with the dataplane instance of the first logical switch. The SDN controller 10selects one service server from the plurality of service servers as thefirst logical switch providing the first logical service. The serviceserver may be any service server in the plurality of service servers, aservice server in the plurality of service servers that is at a shortestdistance to the forwarding device deployed with the data plane instanceof the first logical switch, or a service server with a lightest load inthe plurality of service servers. The SDN controller 10 instructs theforwarding device deployed with the data plane instance of the firstlogical switch to communicatively connect a port of the data planeinstance of the first logical switch to a port of the first logicalservice on the selected service server.

It should be noted that, to associate a logical forwarding device with alogical service, in addition to communicatively connecting a port of theplane instance of the first logical switch to a port of the logicalservice, other necessary configurations may also be required, forexample, granting a right of using the logical service to the logicalforwarding device. The foregoing seventh port may be a type-c port 507,or may be a port of the logical switch for associating with a logicalservice that is different from type-a, type-b, and type-c ports. Aprocess of associating a logical router with a logical service is thesame as the process of associating a logical switch with a logicalservice, and details are not repeated herein.

In this technical solution, the SDN controller 10 communicativelyconnects the port of the logical forwarding device to the port of thelogical service, thereby associating the logical forwarding device withthe logical service.

Optionally, the SDN controller 10 generates, by using a controllerservice layer 111, configuration information to be delivered to theforwarding device, and sends the configuration information to a devicedriver 14. The device driver 14 converts the configuration informationsent by the controller service layer 111 into a form specified in aprotocol of the forwarding device. For example, if the forwarding devicedeployed with the data plane instance of the logical switch is ahardware device, the configuration information generated by thecontroller service layer 111 is converted into a virtual routing andforwarding (Virtual Routing Forwarding, VRF) table; and if theforwarding device deployed with the data plane instance of the logicalswitch is a software module, the configuration information generated bythe controller service layer 111 is converted into a network layer flowtable. Then, the configuration information resulting from the conversionis sent to the forwarding device through a management channel betweenthe device driver 14 and the forwarding device. The management channelmay be a channel based on a protocol such as the Network ConfigurationProtocol (Network Configuration Protocol, NetConf), the OpenFlow(OpenFlow) protocol or the Interface to the Routing System (Interface toRouting System, I2RS) protocol. In some optional implementations, aftergenerating the configuration information to be delivered to theforwarding device, the controller service layer 111 searches for adevice driver 14 supporting the forwarding device, and sends theconfiguration information to the found device driver 14. It should benoted that the configuration information that is generated by thecontroller service layer 111 and delivered to the forwarding device maybe configuration information instructing the forwarding device to createa logical router, create a logical switch, create a port, configurecommunicative connection of one port to another port, or the like.

Optionally, the SDN controller 10 may present a network orchestrationinterface to a user by using a UI module 12. FIG. 7 is a schematicdiagram of the interface. The interface includes operable objects, andthe operable objects include logical switch objects, logical routerobjects, logical host objects, port objects, and logical link objects.The logical switch object is used to create a logical switch, thelogical router object is used to create a logical router; the logicalhost object is used to connect a logical host to an SDN network; theport object is used to create a port for a logical switch, a logicalrouter, or a logical host; and the logical link object is used to createa logical link between two ports. It should be noted that in addition tothe operable objects, the interface shown in FIG. 8 may further displaya menu, help information, and the like.

The network orchestration interface presented to the user may bepresented to one or more platforms 30, so that a user using the platform30 can orchestrate an SDN network by using the interface. For example,the user selects, by using the interface displayed by the platform 30, alogical switch object to create a logical switch, selects a logicalrouter object to create a logical router, selects port objects to createports for the logical router and the logical switch, and selects alogical link object to create a logical link between the ports createdfor the logical router and the logical switch. The network orchestrationinterface presented to the user may alternatively be presented to theuser by using a display of a physical device on which the SDN controller10 is located, and a user can directly select operable objects in theinterface on the physical device to implement SDN network orchestration.

In this technical solution, the SDN controller 10 can provide an SDNnetwork orchestration interface to a user, where object functions in theinterface are consistent with functions of steps of orchestrating aphysical network, so that the user can use the interface to orchestratean SDN network.

Optionally, after receiving an SDN network orchestration request (forexample, a request for creating a logical switch, a request for creatinga logical router, a request for connecting a logical switch to a logicalrouter, or a request for connecting a logical host to a logical switch)sent by the platform 30 or the user by using the UI module 12, a SDNcontroller core 11 may first return a request success message to theplatform or the UI module 12 instead of delivering configurationinformation to the forwarding device, and delivers all configurationinformation to the forwarding device after all SDN network orchestrationoperations of the platform or the user are completed, to complete theSDN network orchestration requested by the platform or the user. Withthis implementation, a time for the user to wait for the SDN controllercore 11 to return a response message can be reduced. In addition,configuration information corresponding to a plurality of operations(for example, creating a logical router, creating a logical switch, andconnecting the logical switch to the logical router) is delivered to theforwarding device at a time. This can reduce a transmission time fordelivering the configuration information and a time for returning aconfiguration success message, thereby reducing time consumption of SDNnetwork orchestration and improving efficiency of SDN networkorchestration.

Optionally, the SDN controller 10 in this embodiment of this applicationmay provide the SDN network orchestration service for a plurality ofplatforms 30. The plurality of platforms 30 may be of different typesand have different service models. A platform application 13 of the SDNcontroller 10 may convert service models of the platforms 30 into auniform network service model, for example, a network service modelshown in FIG. 1, so that platforms 30 with different service models canall orchestrate an SDN network through the SDN controller 10.

Optionally, in addition to using the uniform network service modelprovided by the service model module 112 of the controller 10 toorchestrate an SDN network, a platform 30 can also use a service modelof the platform 30 itself to orchestrate an SDN network. For example,when the user orchestrates the SDN network by using a Neutron model ofan OpenStack platform, another implementation of step 401 may be: Theplatform 30 sends, to the SDN controller 10, a request for creating alogical network, the SDN controller 10 saves information about thelogical network, for example, an identifier of a logical router to whichthe logical network is connected and an identifier of the logicalnetwork, and then returns, to the platform 30, a message aboutsuccessful creation of the logical network. Then, the platform 30 sends,to the SDN controller 10, a request for creating a logical subnet of thelogical network, and the SDN controller 10 determines, based on therequest for creating a logical subnet and the saved information aboutthe logical network, to create the first logical switch, and obtains thefirst request for creating the first logical switch. Further, if therequest for creating a logical network carries a message indicating thatthe logical network is to be connected to the first logical router, step403 may be automatically triggered by the SDN controller 10 after thefirst logical switch is created successfully, so as to improveefficiency of SDN network orchestration.

In this technical solution, the SDN controller 10 can support a platform30 in orchestrating an SDN network based on a service model of theplatform 30 itself, thereby improving compatibility of the SDNcontroller 10 with existing platforms 30.

FIG. 8 is a schematic diagram of an SDN controller according to anembodiment of this application. The SDN controller includes:

a first obtaining module 601, configured to obtain a first request forcreating a first logical switch;

a first response module 602, configured to, in response to the firstrequest, create a control plane instance of the first logical switch,determine to deploy a data plane instance of the first logical switch ona first forwarding device, and send first configuration information tothe first forwarding device, where the first configuration informationis used to instruct the first forwarding device to configure the dataplane instance of the first logical switch; the control plane instanceof the first logical switch is used to run a communications protocol,generate a forwarding rule table, and send the forwarding rule table tothe data plane instance of the first logical switch; and the data planeinstance of the first logical switch is used to perform data forwardingaccording to the forwarding rule table;

a second obtaining module 603, configured to obtain a second request forconnecting the first logical switch to a first logical router; and

a second response module 604, configured to, in response to the secondrequest, send second configuration information to the first forwardingdevice, and send third configuration information to a second forwardingdevice configured with a data plane instance of the first logicalrouter, where the second configuration information is used to instructthe first forwarding device to configure a first port of the data planeinstance of the first logical switch to be communicatively connected toa second port of the data plane instance of the first logical router onthe second forwarding device, and the third configuration information isused to instruct the second forwarding device to configure the secondport to be communicatively connected to the first port.

Optionally, the SDN controller further includes:

a third obtaining module 605, configured to obtain, after the firstresponse module sends first configuration information to the firstforwarding device, a third request for connecting a first logical hostto the first logical switch; and

a third response module 606, configured to send fourth configurationinformation to a computing device configured with an instance of thefirst logical host, where the fourth configuration information is usedto instruct the computing device to configure a third port of theinstance of the first logical host to be communicatively connected to afourth port of the data plane instance of the first logical switch onthe first forwarding device; and send fifth configuration information tothe first forwarding device, where the fifth configuration informationis used to instruct the first forwarding device to configure the fourthport to be communicatively connected to the third port.

Optionally, the third obtaining module 605 is configured to:

receive a fourth request for connecting the first logical host to an SDNnetwork;

determine, based on a topology structure of a physical network, toconnect the instance of the first logical host to the data planeinstance of the first logical switch on the first forwarding device,where the physical network includes the first forwarding device and thecomputing device; and

generate the third request for connecting the first logical host to thefirst logical switch, so as to obtain the third request.

Optionally, the first response module 602 is configured to:

obtain information that is carried in the first request and that isabout a designated forwarding device, and determine to deploy the dataplane instance of the first logical switch on the designated forwardingdevice, where the designated forwarding device includes the firstforwarding device.

Optionally, the first response module 602 is configured to:

determine, based on the topology structure of the physical network, atleast one forwarding device for deployment of the data plane instance ofthe first logical switch, where the at least one forwarding deviceincludes the first forwarding device.

Optionally, the first response module is further configured to: aftercreating a control plane instance of the first logical switch, determineto deploy the data plane instance of the first logical switch on a thirdforwarding device, and send sixth configuration information to the thirdforwarding device, where the sixth configuration information is used toinstruct the third forwarding device to configure the data planeinstance of the first logical switch.

Optionally, the first configuration information is further used toinstruct the first forwarding device to configure a fifth port of thefirst logical switch that is configured by the first forwarding deviceto be communicatively connected to a sixth port of the data planeinstance of the first logical switch on the third forwarding device, andthe sixth configuration information is further used to instruct thethird forwarding device to configure the sixth port to becommunicatively connected to the fifth port.

Optionally, the SDN controller further includes:

a fourth obtaining module 607, configured to obtain, after the firstresponse module sends first configuration information to the firstforwarding device, a sixth request for associating the first logicalswitch with a first logical service; and

a fourth response module 608, configured to, in response to the sixthrequest, determine an access port of an instance of the first logicalservice; and send eighth configuration information to the firstforwarding device, where the eighth configuration information is used toinstruct the first forwarding device to configure a seventh port of thedata plane instance of the first logical switch to be communicativelyconnected to the access port.

In this embodiment of this application, the module division is anexample and merely logical function division, and there may be otherdivision manners in actual implementation. In addition, the functionalmodules in this embodiment of this application may be integrated intoone processor, or each of the modules may exist alone physically, or twoor more modules may be integrated into one module. The integrated modulemay be implemented in a form of hardware, or may be implemented in aform of a software functional module.

When an integrated module is implemented in a form of hardware, as shownin FIG. 9, an SDN controller may include a processor 701, acommunications interface 702, and a memory 703. The processor 701 mayinclude a central processing unit (central processing unit, CPU), anetwork processor (network processor, NP), or a combination of a CPU andan NP. The processor 701 may further include a hardware chip. Thehardware chip may be an application-specific integrated circuit(application-specific integrated circuit, ASIC), a programmable logicdevice (programmable logic device, PLD), or a combination thereof. ThePLD may be a complex programmable logic device (complex programmablelogic device, CPLD), a field-programmable gate array (field-programmablegate array, FPGA), a generic array logic (generic array logic, GAL), orany combination thereof.

The processor 701 receives, by using the communications interface 702, arequest sent by a user or a platform, and sends configurationinformation to a forwarding device.

The memory 703 is configured to store various configuration informationrelated in the foregoing method, a topology structure of a physicalnetwork, and the like. The memory 703 is further configured to storeprogram code executed by the processor 701. The memory 703 may be anon-volatile memory, for example, a hard disk drive (hard disk drive,HDD) or a solid-state drive (solid-state drive, SSD), or a volatilememory (volatile memory), for example, a random-access memory(random-access memory, RAM). The memory 703 may be any othercomputer-accessible media that can be used to carry or store expectedprogram code in an instruction or data structure form, without beinglimited thereto though. The processor 701 is configured to execute theprogram code stored in the memory 703, and specifically configured toimplement the method in the embodiments shown in FIG. 1 to FIG. 7.

This embodiment of the present invention does not define a specificconnection medium between the processor 701, the communicationsinterface 702, and the memory 703. In this embodiment of thisapplication, the memory 703, the processor 701, and the communicationsinterface 702 are connected by a bus in FIG. 9, where the bus isrepresented by a bold line in FIG. 9. This is only a schematicillustration and is not intended for limitation. There may be otherconnection manners between the components though. The bus may beclassified into an address bus, a data bus, a control bus, and the like.For ease of representation, only one bold line is used to represent thebus in FIG. 9, but this does not mean that there is only one bus or onlyone type of bus.

An embodiment of this application further provides a computer-readablestorage medium, where the computer-readable storage medium stores acomputer instruction, and when the instruction is run on a computer, thecomputer executes the methods in the possible implementations of the SDNnetwork orchestration method.

Obviously, a person skilled in the art can make various modificationsand variations to this application without departing from the scope ofthis application. This application is intended to cover thesemodifications and variations of this application provided that they fallwithin the scope of protection defined by the following claims and theirequivalent technologies.

1. A software defined networking (SDN) orchestration method, comprising:obtaining a first request for creating a first logical switch; inresponse to the first request, creating a control plane instance of thefirst logical switch, and sending first configuration information to afirst forwarding device to instruct the first forwarding device toconfigure a data plane instance of the first logical switch, wherein thecontrol plane instance of the first logical switch is configured togenerate a forwarding rule table, and send the forwarding rule table tothe data plane instance of the first logical switch to perform dataforwarding according to the forwarding rule table; obtaining a secondrequest for connecting the first logical switch to a first logicalrouter; and in response to the second request, sending secondconfiguration information to the first forwarding device to instruct thefirst forwarding device to configure a first port of the data planeinstance of the first logical switch to be communicatively connected toa second port of the data plane instance of the first logical router onthe second forwarding device, and sending third configurationinformation to a second forwarding device configured with a data planeinstance of the first logical router to instruct the second forwardingdevice to configure the second port to be communicatively connected tothe first port.
 2. The method according to claim 1, wherein aftersending the first configuration information to the first forwardingdevice, the method further comprises: obtaining a third request forconnecting a first logical host to the first logical switch; sendingfourth configuration information to a computing device configured withan instance of the first logical host to instruct the computing deviceto configure a third port of the instance of the first logical host tobe communicatively connected to a fourth port of the data plane instanceof the first logical switch on the first forwarding device; and sendingfifth configuration information to the first forwarding device toinstruct the first forwarding device to configure the fourth port to becommunicatively connected to the third port.
 3. The method according toclaim 2, wherein the obtaining a third request for connecting a firstlogical host to the first logical switch comprises: receiving a fourthrequest for connecting the first logical host to an SDN network;determining, based on a topology structure of a physical network, toconnect the instance of the first logical host to the data planeinstance of the first logical switch on the first forwarding device,wherein the physical network comprises the first forwarding device andthe computing device; and generating the third request for connectingthe first logical host to the first logical switch to obtain the thirdrequest.
 4. The method according to claim 1, further comprising:obtaining information from the first request indicating a designatedforwarding device, and deploying the data plane instance of the firstlogical switch on the designated forwarding device, wherein thedesignated forwarding device comprises the first forwarding device. 5.The method according to claim 3, wherein the deploying a data planeinstance of the first logical switch on a first forwarding devicecomprises: determining, based on the topology structure of the physicalnetwork, at least one forwarding device for deployment of the data planeinstance of the first logical switch, wherein the at least oneforwarding device comprises the first forwarding device.
 6. The methodaccording to claim 1, wherein after creating the control plane instanceof the first logical switch, the method further comprises: deploying thedata plane instance of the first logical switch on a third forwardingdevice; and sending sixth configuration information to the thirdforwarding device to instruct the third forwarding device to configurethe data plane instance of the first logical switch.
 7. The methodaccording to claim 6, wherein the first configuration informationfurther instructs the first forwarding device to configure a fifth portof the data plane instance of the first logical switch that isconfigured by the first forwarding device to be communicativelyconnected to a sixth port of the data plane instance of the firstlogical switch on the third forwarding device, and the sixthconfiguration information further instructs the third forwarding deviceto configure the sixth port to be communicatively connected to the fifthport.
 8. The method according to claim 1, wherein after sending thefirst configuration information to the first forwarding device, themethod further comprises: obtaining a sixth request for associating thefirst logical switch with a first logical service; in response to thesixth request, determining an access port of an instance of the firstlogical service; and sending eighth configuration information to thefirst forwarding device to instruct the first forwarding device toconfigure a seventh port of the data plane instance of the first logicalswitch to be communicatively connected to the access port.
 9. A softwaredefined networking (SDN) controller, comprising: one or more processors;and one or more memories storing instructions, which when executed bythe one or more processors, cause the SDN controller to: obtain a firstrequest for creating a first logical switch; in response to the firstrequest, create a control plane instance of the first logical switch,and send first configuration information to a first forwarding device toinstruct the first forwarding device to configure a data plane instanceof the first logical switch, wherein the control plane instance of thefirst logical switch is configured to generate a forwarding rule table,and send the forwarding rule table to the data plane instance of thefirst logical switch to perform data forwarding according to theforwarding rule table; obtain a second request for connecting the firstlogical switch to a first logical router; and in response to the secondrequest, send second configuration information to the first forwardingdevice to instruct the first forwarding device to configure a first portof the data plane instance of the first logical switch to becommunicatively connected to a second port of the data plane instance ofthe first logical router on the second forwarding device, and send thirdconfiguration information to a second forwarding device configured witha data plane instance of the first logical router to instruct the secondforwarding device to configure the second port to be communicativelyconnected to the first port.
 10. The SDN controller according to claim9, wherein the SDN controller is further caused to: obtain, after thefirst response module sends first configuration information to the firstforwarding device, a third request for connecting a first logical hostto the first logical switch; and send fourth configuration informationto a computing device configured with an instance of the first logicalhost to instruct the computing device to configure a third port of theinstance of the first logical host to be communicatively connected to afourth port of the data plane instance of the first logical switch onthe first forwarding device; and send fifth configuration information tothe first forwarding device to instruct the first forwarding device toconfigure the fourth port to be communicatively connected to the thirdport.
 11. The SDN controller according to claim 10, wherein the SDNcontroller is further caused to: receive a fourth request for connectingthe first logical host to an SDN network; determine, based on a topologystructure of a physical network, to connect the instance of the firstlogical host to the data plane instance of the first logical switch onthe first forwarding device, wherein the physical network comprises thefirst forwarding device and the computing device; and generate the thirdrequest for connecting the first logical host to the first logicalswitch to obtain the third request.
 12. The SDN controller according toclaim 9, wherein the SDN controller is further caused to: obtaininformation from the first request indicating a designated forwardingdevice, and deploy the data plane instance of the first logical switchon the designated forwarding device, wherein the designated forwardingdevice comprises the first forwarding device.
 13. The SDN controlleraccording to claim 9, wherein the SDN controller is further caused to:determine, based on the topology structure of the physical network, atleast one forwarding device for deployment of the data plane instance ofthe first logical switch, wherein the at least one forwarding devicecomprises the first forwarding device.
 14. The SDN controller accordingto claim 9, wherein the SDN controller is further caused to: aftercreating a control plane instance of the first logical switch, deploythe data plane instance of the first logical switch on a thirdforwarding device, and send sixth configuration information to the thirdforwarding device to instruct the third forwarding device to configurethe data plane instance of the first logical switch.
 15. The SDNcontroller according to claim 14, wherein the first configurationinformation further instructs the first forwarding device to configure afifth port of the first logical switch that is configured by the firstforwarding device to be communicatively connected to a sixth port of thedata plane instance of the first logical switch on the third forwardingdevice, and the sixth configuration information further instructs thethird forwarding device to configure the sixth port to becommunicatively connected to the fifth port.
 16. The SDN controlleraccording to claim 9, wherein the SDN controller is further caused to:obtain, after the first response module sends first configurationinformation to the first forwarding device, a sixth request forassociating the first logical switch with a first logical service; andin response to the sixth request, determine an access port of aninstance of the first logical service; and send eighth configurationinformation to the first forwarding device, wherein the eighthconfiguration information instructs the first forwarding device toconfigure a seventh port of the data plane instance of the first logicalswitch to be communicatively connected to the access port.
 17. A networksystem, comprising: a software defined networking (SDN) controller, afirst forwarding device, and a second forwarding device; wherein the SDNcontroller is configured to: obtain a first request for creating a firstlogical switch; in response to the first request, create a control planeinstance of the first logical switch, deploy a data plane instance ofthe first logical switch on a first forwarding device, and sending firstconfiguration information to the first forwarding device to instruct thefirst forwarding device to configure a data plane instance of the firstlogical switch, wherein the control plane instance of the first logicalswitch is configured to generate a forwarding rule table, and send theforwarding rule table to the data plane instance of the first logicalswitch to perform data forwarding according to the forwarding ruletable; obtain a second request for connecting the first logical switchto a first logical router; and in response to the second request, sendsecond configuration information to the first forwarding device toinstruct the first forwarding device to configure a first port of thedata plane instance of the first logical switch to be communicativelyconnected to a second port of the data plane instance of the firstlogical router on the second forwarding device, and send thirdconfiguration information to the second forwarding device configuredwith a data plane instance of the first logical router to instruct thesecond forwarding device to configure the second port to becommunicatively connected to the first port.
 18. The controlleraccording to claim 17, wherein the SDN controller is further configuredto: obtain a third request for connecting a first logical host to thefirst logical switch; send fourth configuration information to acomputing device configured with an instance of the first logical hostto instruct the computing device to configure a third port of theinstance of the first logical host to be communicatively connected to afourth port of the data plane instance of the first logical switch onthe first forwarding device; and send fifth configuration information tothe first forwarding device to instruct the first forwarding device toconfigure the fourth port to be communicatively connected to the thirdport.
 19. The controller according to claim 18, wherein the SDNcontroller is further configured to: receive a fourth request forconnecting the first logical host to an SDN network; determine, based ona topology structure of a physical network, to connect the instance ofthe first logical host to the data plane instance of the first logicalswitch on the first forwarding device, wherein the physical networkcomprises the first forwarding device and the computing device; andgenerate the third request for connecting the first logical host to thefirst logical switch, so as to obtain the third request.
 20. Thecontroller according to claim 17, wherein the SDN controller is furtherconfigured to: obtain information from the first request indicating adesignated forwarding device, and determine to deploy the data planeinstance of the first logical switch on the designated forwardingdevice, wherein the designated forwarding device comprises the firstforwarding device.